AVR Tutorial

AVR Basics

If you are reading this tutorial, you should be already familiar with electricity and microcontroller basics. If not, read through “Introduction to Electricity” and “Microcontroller tutorial” and then return.
AVR microcontrollers can be termed as a mini computer with all peripherals on the chip. A typical AVR microcontroller can contain peripherals like RAM, EEPROM, Flash memory, Input-Output (I/O) pins, Analog to Digital converters, PWM channels, Timers etc. It also has a CPU for processing, but not as fast and complex as the one within a computer.
These AVR microcontroller (from now on termed as µc’s) is an 8-bit microcontroller and based on Reduced Instruction Set Computer (RISC) architecture. 8-bit means that the µc can transmit and receive data in a set of 8 bits.  Atmel manufactures 3 variations of 8-bit microcontrollers.

The figure below shows three different types of AVR Microcontrollers.

AVR Compare

These variations are there to distinguish based on their physical size, memory size, number of inbuilt peripherals and their applications. MegaAVR is the most popular one with enough memory for our basic projects with suitable peripherals.
Atmega8 is one such MegaAVR which will be discussed here, in this tutorial. Atmel provides datasheets for each AVR manufactured. They look so complex and huge that it is easier to get lost within that. However it is recommended to understand one datasheet and the format remains same for others too. Atmega8 data sheet can be found here, with 300 and odd pages. The first page provides information on all the features included in Atmega8 and the second details pin configuration. Information in these two pages can be kept handy as a basic reference. Some of the features can be highlighted here:

There are also other features like interrupts, timers, PWM controls, Analog to Digital Converters (ADC) and more, which we will discuss as and when we use those features in our projects.

Do you have anything to say?
Visit the Forum to discuss, learn and share anything related to robotics and electronics !!

rss feeds



Featured Videos




Advertisements


Recent Articles




Atmega8 Development Board


A great step-by-step tutorial on building your own Atmel AVR based Atmega8 development board. The board is ideal for beginners with detailed explanation and pictures More...

L293D Motor Driver


For robots to do work, you need to know how to control a motor. L293D is a cleverly packed IC which can control two DC motors in both directions: forwards and reverse. Here is a detailed explanation of building a board based on L293D ICMore...

Hobby Servo Tutorial


Servo Motor is a device which uses error-sensing feedback signals to determine and control the position of a motor shaft. The term "servomechanism" closely relates to servo motors..More...

Blinking LED Tutorial


This is similar to what we achieve in any "Hello World" program. However, it is not just limited to blinking LED but scratches the surface of AVR-GCC programming... More...


Kindly Donate

If this site has helped you, then kindly consider a Donation to say "Thank You!!". Donation might help us keep all this information available for free and also pay for the resources.

If that is difficult, then a simple "Hi" in the forum would still do good :)